import request from './index.js'

export const addReturnReason = (data) => {
  return request.post('/order/reason/for/return', data)
}

export const updateReturnReason = (data) => {
  return request.put('/order/reason/for/return', data)
}

export const updateReturnReasonStatus = (id, status) => {
  return request.patch('/order/reason/for/return', null, {
    params: {
      returnReasonId: id,
      status: status,
    },
  })
}

export const listReturnReasons = (page, pageSize) => {
  return request.get('/order/reason/for/return', {
    params: {
      page,
      pageSize,
    },
  })
}

export const deleteReturnReason = (returnReasonId) => {
  return request.delete('/order/reason/for/return', {
    params: {
      returnReasonId: returnReasonId,
    },
  })
}
